package com.itheima.Day14;

import java.io.File;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;

public class Demo {
    public static void main(String[] args) throws ClassNotFoundException, NoSuchFieldException {

        Class clazz = Class.forName("com.itheima.Day14.Student");
        Field[] fields = clazz.getFields();
        for (Field field : fields) {
            System.out.println(field);
        }

/*
        Field[] fields = clazz.getDeclaredFields();
        for (Field field : fields) {
            System.out.println(field);
        }
*/

        /*
        Class clazz = Class.forName("com.itheima.Day14.Student");
        Field field = clazz.getDeclaredField("age");
        System.out.println(field);*/
    }
/*    public static void main(String[] args) throws ClassNotFoundException, NoSuchMethodException, NoSuchFieldException {
        Class clazz = Class.forName("com.itheima.Day14.Student");
        Field field = clazz.getField("name");
        System.out.println(field);
    }*/
}